package com.zbkj.admin.task;

import com.zbkj.dal.common.utils.CrmebDateUtil;
import com.zbkj.service.service.QuotaTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component("QuotaAutoCancelTask")
public class QuotaAutoCancelTask {

    @Resource
    private QuotaTaskService quotaTaskService;

    public void quotaAutoCancel() {
        log.info("---QuotaAutoCancelTask task------ Execution Time - {}", CrmebDateUtil.nowDateTime());
        try {
            quotaTaskService.quotaAutoCancel();
        } catch (Exception e) {
            log.error("额度自动取消任务失败", e);
            log.error("QuotaAutoCancelTask.task" + " | msg : " + e.getMessage());
        }
    }

}
